home *** CD-ROM | disk | FTP | other *** search
- <%@ Language=VBScript CODEPAGE=65001 %>
- <!--#include file="include/wmsConstants.inc"-->
- <!--#include file="include/wmsLocStrings.inc"-->
- <!--#include file="include/wmsCommon.inc"-->
- <%
- '+-------------------------------------------------------------------------
- '
- ' Microsoft Windows Media
- ' Copyright (C) Microsoft Corporation. All rights reserved.
- '
- ' File: Server.asp
- '
- ' Contents: Serves as a redirect for the standard frameset.
- '
- '--------------------------------------------------------------------------
-
- '//////////////////////////////////////////////////////////////////////////
- Function GetCurrentPage( szServerName )
- Dim curPageDictionary
- Dim szUrl
- szUrl = ""
-
- Set curPageDictionary = Session( "CurrentPage" )
-
- if( IsEmpty( curPageDictionary ) ) then
- Set curPageDictionary = Server.CreateObject("Scripting.Dictionary")
-
- Set Session( "CurrentPage" ) = curPageDictionary
- curPageDictionary.Add "default", "server_status.asp"
- curPageDictionary.Add UCase( szServerName ), "server_status.asp"
- szUrl = "server_status.asp"
- else
- if( curPageDictionary.Exists( szServerName ) ) then
- szUrl = curPageDictionary( szServerName )
- else
- curPageDictionary.Add UCase( szServerName ), "server_status.asp"
- szUrl = "server_status.asp"
- end if
- end if
-
- dwOffset = InStr( szUrl, ",+" )
- if( dwOffset ) then
- szUrl = Left( szUrl, dwOffset )
- end if
- GetCurrentPage = szUrl
- exit function
- End Function
-
- Dim strCurrentPage
- Dim strServer
- Dim dwResult
-
- strServer = RemoveDangerousCharacters( UCase( Request.QueryString( "server" ) ) )
- if( 0 >= Len( strServer ) ) then
- strServer = "Default"
- end if
-
- strCurrentPage = GetCurrentPage( strServer )
-
- dwResult = InStr( 1, strCurrentPage, "server=", vbTextCompare )
- Dim strFinalUrl
- if( ( 0 = dwResult ) or ( null = dwResult ) ) then
- strFinalUrl = strCurrentPage & "?server=" & RemoveDangerousCharacters( strServer )
- else
- strFinalUrl = strCurrentPage
- end if
- strFinalUrl = Replace( strFinalUrl, chr( 34 ), "", 1, -1, vbTextCompare )
- Response.Redirect( strFinalUrl )
-
- %>